package cn.calm.cxf.restful.service;

import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

@Path("/room")
@Produces("application/json")
public interface RoomService {

	@GET
	@Path("/room/{id}")
	@Produces({ MediaType.APPLICATION_JSON })
	public Room root(@PathParam("id") String id) ;

	@POST
	@Path("/room")
	@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
	public void addRoom(Room room);

	@PUT
	@Path("/room/{id}")
	@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
	public void updateRoom(@PathParam("id") String id, Room room) ;

	@DELETE
	@Path("/room/{id}")
	@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
	public void deleteRoom(@PathParam("id") String id) ;

	@POST
	@Path("/room/{id}")
	@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
	public void addPerson(@PathParam("id") String id, Person person);

	@DELETE
	@Path("/room/{id}/{name}")
	@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
	public void deletePerson(@PathParam("id") String id,
			@PathParam("name") String name) ;
}